import {mapGetters} from "vuex"
export default {
	computed: {
		...mapGetters("m_cart", ["total"])
	},
	onShow() {
		
	},
	methods: {
		setBadeg() {
			uni.setTabBarBadge({
				index: 2,
				text: this.total + ""
			})
		}
	},
	watch: {
		total: {
			immediate: true,
			handler(newVal) {
				this.setBadeg()
			}
		}
	}
}